﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace DAL
{
    public class PercentageDate
    {
        public static DataTable listWithSaleAndYear(int saleid,int year)
        {
            return DbHelper.ExecuteDataTable("p_PercentageDate_listWithSaleAndYear",saleid,year);
        }
        public static void insert(int saleid,int year,int adminid)
        {
            DbHelper.ExecuteNonQuery("p_PercentageDate_insert", saleid, year, adminid);
        }

        public static bool isExist(int year,int saleid)
        {
            if (Convert.ToInt32(DbHelper.ExecuteScalar("p_PercentageDate_isExist",year,saleid))>= 1)
                return true;
            else
                return false;
        }
    }
}
